Skip to content

Conversation

@jadhavrohit924
Copy link
Contributor

@jadhavrohit924 jadhavrohit924 commented Oct 17, 2025

Summary

Creates a DefaultServerCluster out of the ICD Management.

Related issues

Fixes: #40988

Testing

  • Manually tested lit-icd-app with basic functionality read attributes.
  • Unit tests.

Readability checklist

The checklist below will help the reviewer finish PR review in time and keep the
code readable:

  • PR title is
    descriptive
  • Apply the
    “When in Rome…”
    rule (coding style)
  • PR size is short
  • Try to avoid "squashing" and "force-update" in commit history
  • CI time didn't increase

See: Pull Request Guidelines

Copilot AI review requested due to automatic review settings October 17, 2025 05:55
@jadhavrohit924 jadhavrohit924 requested review from a team as code owners October 17, 2025 05:55
@github-actions github-actions bot added examples app examples chef Changes in examples/chef labels Oct 17, 2025
@pullapprove pullapprove bot added review - pending and removed examples app examples chef Changes in examples/chef labels Oct 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

The PR decouples the ICD Management cluster to be code driven by migrating from a ZAP/Ember-based implementation to a modern DefaultServerCluster approach. This transformation makes the cluster more maintainable and testable while aligning with the project's architectural goals.

Key changes:

  • Converted from AttributeAccessInterface pattern to DefaultServerCluster
  • Created separate ICDManagementCluster and ICDManagementClusterWithCIP classes for different feature sets
  • Added comprehensive unit tests for cluster functionality
  • Moved ClusterRevision from RAM-based storage to callback-based implementation

Reviewed Changes

Copilot reviewed 40 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/app/clusters/icd-management-server/ICDManagementCluster.h Redesigned class hierarchy with base ICDManagementCluster and CIP-enabled subclass
src/app/clusters/icd-management-server/ICDManagementCluster.cpp Implemented new cluster logic with DefaultServerCluster pattern
src/app/clusters/icd-management-server/CodegenIntegration.cpp Added integration layer for codegen cluster registration
src/app/clusters/icd-management-server/tests/TestICDManagementCluster.cpp Added unit tests for cluster attributes and commands
zzz_generated/app-common/app-common/zap-generated/callback.h Removed legacy command callbacks
zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h Removed ClusterRevision accessor functions
examples/*.matter Updated ClusterRevision from RAM to callback attribute across all examples

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request effectively refactors the ICD Management cluster to be a code-driven implementation, which is a great improvement. The changes align well with the established patterns for code-driven clusters in this repository, including the addition of unit tests. The overall structure is clean and well-organized. I have a couple of minor suggestions to further improve code quality and test coverage.

@jadhavrohit924 jadhavrohit924 changed the title Decouple ICD Management cluster to be code driven. [Part3] Decouple ICD Management cluster to be code driven. Oct 17, 2025
@github-actions
Copy link

PR #41499: Size comparison from a95f163 to c50365d

Full report (1 build for stm32)
platform target config section a95f163 c50365d change % change
stm32 light STM32WB5MM-DK FLASH 469812 469812 0 0.0
RAM 141248 141248 0 0.0

@github-actions github-actions bot added examples app examples chef Changes in examples/chef labels Oct 17, 2025
@github-actions
Copy link

github-actions bot commented Oct 17, 2025

PR #41499: Size comparison from a95f163 to b66acf8

Increases above 0.2%:

platform target config section a95f163 b66acf8 change % change
nxp contact mcxw71+release FLASH 691400 693240 1840 0.3
RAM 61424 61584 160 0.3
lock mcxw71+release FLASH 773168 775016 1848 0.2
RAM 61868 62020 152 0.2
telink light-switch-app-ota-compress-lzma-factory-data tl7218x_retention RAM 51736 51900 164 0.3
light-switch-app-ota-factory-data tl3218x_retention RAM 34484 34648 164 0.5
Full report (37 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section a95f163 b66acf8 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106366 1106366 0 0.0
RAM 178802 178802 0 0.0
bl702 lighting-app bl702+eth FLASH 660956 660956 0 0.0
RAM 134881 134881 0 0.0
bl702+wifi FLASH 837068 837068 0 0.0
RAM 124349 124349 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070036 1070036 0 0.0
RAM 117189 117189 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 898878 899798 920 0.1
RAM 105468 105676 208 0.2
lighting-app bl702l+mfd+littlefs FLASH 983054 983054 0 0.0
RAM 109676 109676 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770364 770364 0 0.0
RAM 103240 103240 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782120 783272 1152 0.1
RAM 108400 108560 160 0.1
pump-app LP_EM_CC1354P10_6 FLASH 727940 727940 0 0.0
RAM 97308 97308 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 712384 712384 0 0.0
RAM 97508 97508 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554066 554066 0 0.0
RAM 205504 205504 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587318 588486 1168 0.2
RAM 205768 205920 152 0.1
efr32 lock-app BRD4187C FLASH 962192 963640 1448 0.2
RAM 126268 126428 160 0.1
BRD4338a FLASH 757728 759616 1888 0.2
RAM 255540 255692 152 0.1
window-app BRD4187C FLASH 1057460 1059332 1872 0.2
RAM 122464 122592 128 0.1
esp32 all-clusters-app c3devkit DRAM 103192 103192 0 0.0
FLASH 1796424 1796424 0 0.0
IRAM 83862 83862 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933264 933264 0 0.0
RAM 161069 161069 0 0.0
nxp contact mcxw71+release FLASH 691400 693240 1840 0.3
RAM 61424 61584 160 0.3
lighting mcxw71+release FLASH 722896 722896 0 0.0
RAM 68084 68084 0 0.0
lock mcxw71+release FLASH 773168 775016 1848 0.2
RAM 61868 62020 152 0.2
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1676484 1676484 0 0.0
RAM 213660 213660 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1592556 1592556 0 0.0
RAM 210956 210956 0 0.0
light cy8ckit_062s2_43012 FLASH 1459172 1459172 0 0.0
RAM 197656 197656 0 0.0
lock cy8ckit_062s2_43012 FLASH 1491724 1493204 1480 0.1
RAM 225376 225528 152 0.1
qpg lighting-app qpg6200+debug FLASH 836552 837728 1176 0.1
RAM 127644 127804 160 0.1
lock-app qpg6200+debug FLASH 773252 774724 1472 0.2
RAM 118620 118780 160 0.1
realtek light-switch-app rtl8777g FLASH 706224 707696 1472 0.2
RAM 106800 106960 160 0.1
lighting-app rtl8777g FLASH 757320 757320 0 0.0
RAM 127164 127164 0 0.0
stm32 light STM32WB5MM-DK FLASH 469812 469812 0 0.0
RAM 141248 141248 0 0.0
telink bridge-app tl7218x FLASH 710462 710462 0 0.0
RAM 90436 90436 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 796848 796848 0 0.0
RAM 40936 40936 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788048 788048 0 0.0
RAM 93580 93580 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 714974 716154 1180 0.2
RAM 51736 51900 164 0.3
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748278 749458 1180 0.2
RAM 70784 70940 156 0.2
light-switch-app-ota-factory-data tl3218x_retention FLASH 725126 726306 1180 0.2
RAM 34484 34648 164 0.5
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602366 602366 0 0.0
RAM 108628 108628 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820668 820672 4 0.0
RAM 91976 91976 0 0.0

@codecov
Copy link

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 58.06452% with 26 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.02%. Comparing base (a95f163) to head (b66acf8).
⚠️ Report is 54 commits behind head on master.

Files with missing lines Patch % Lines
...ers/icd-management-server/ICDManagementCluster.cpp 59.01% 25 Missing ⚠️
src/app/util/util.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master   #41499   +/-   ##
=======================================
  Coverage   51.01%   51.02%           
=======================================
  Files        1386     1387    +1     
  Lines      100988   101054   +66     
  Branches    13081    13085    +4     
=======================================
+ Hits        51519    51558   +39     
- Misses      49469    49496   +27     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI review requested due to automatic review settings October 27, 2025 08:54
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 40 out of 40 changed files in this pull request and generated 3 comments.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 42 out of 42 changed files in this pull request and generated 1 comment.

@mergify mergify bot removed the conflict label Nov 6, 2025
@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41499: Size comparison from 79e4f9d to 94c3562

Full report (4 builds for cc32xx, realtek)
platform target config section 79e4f9d 94c3562 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554906 554906 0 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587786 588770 984 0.2
RAM 205872 206032 160 0.1
realtek light-switch-app rtl8777g FLASH 706928 708336 1408 0.2
RAM 106964 107124 160 0.1
lighting-app rtl8777g FLASH 757864 757864 0 0.0
RAM 127296 127296 0 0.0

Copilot AI review requested due to automatic review settings November 6, 2025 07:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 43 out of 43 changed files in this pull request and generated 3 comments.

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41499: Size comparison from 79e4f9d to a785235

Full report (6 builds for cc32xx, nrfconnect, realtek, stm32)
platform target config section 79e4f9d a785235 change % change
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554906 554906 0 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587786 588770 984 0.2
RAM 205872 206032 160 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933432 933432 0 0.0
RAM 161377 161377 0 0.0
realtek light-switch-app rtl8777g FLASH 706928 708336 1408 0.2
RAM 106964 107124 160 0.1
lighting-app rtl8777g FLASH 757864 757864 0 0.0
RAM 127296 127296 0 0.0
stm32 light STM32WB5MM-DK FLASH 470256 470256 0 0.0
RAM 141352 141352 0 0.0

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

PR #41499: Size comparison from 79e4f9d to 1f21fb9

Increases above 0.2%:

platform target config section 79e4f9d 1f21fb9 change % change
efr32 lock-app BRD4338a FLASH 757808 759552 1744 0.2
nxp contact mcxw71+release FLASH 692520 694208 1688 0.2
RAM 61552 61712 160 0.3
telink light-switch-app-ota-compress-lzma-factory-data tl7218x_retention RAM 51892 52048 156 0.3
light-switch-app-ota-factory-data tl3218x_retention RAM 34624 34780 156 0.5
Full report (35 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, efr32, esp32, nrfconnect, nxp, psoc6, qpg, realtek, stm32, telink)
platform target config section 79e4f9d 1f21fb9 change % change
bl602 lighting-app bl602+mfd+littlefs+rpc FLASH 1106380 1106380 0 0.0
RAM 178930 178930 0 0.0
bl702 lighting-app bl702+eth FLASH 661414 661414 0 0.0
RAM 135025 135025 0 0.0
bl702+wifi FLASH 837048 837048 0 0.0
RAM 124445 124445 0 0.0
bl706+mfd+rpc+littlefs FLASH 1070586 1070586 0 0.0
RAM 117317 117317 0 0.0
bl702l contact-sensor-app bl702l+mfd+littlefs FLASH 900018 901292 1274 0.1
RAM 105612 105788 176 0.2
lighting-app bl702l+mfd+littlefs FLASH 983332 983332 0 0.0
RAM 109796 109796 0 0.0
cc13x4_26x4 lighting-app LP_EM_CC1354P10_6 FLASH 770812 770812 0 0.0
RAM 103360 103360 0 0.0
lock-ftd LP_EM_CC1354P10_6 FLASH 782640 783608 968 0.1
RAM 108528 108680 152 0.1
pump-app LP_EM_CC1354P10_6 FLASH 728588 728588 0 0.0
RAM 97420 97420 0 0.0
pump-controller-app LP_EM_CC1354P10_6 FLASH 713056 713056 0 0.0
RAM 97636 97636 0 0.0
cc32xx air-purifier CC3235SF_LAUNCHXL FLASH 554906 554906 0 0.0
RAM 205776 205776 0 0.0
lock CC3235SF_LAUNCHXL FLASH 587786 588770 984 0.2
RAM 205872 206032 160 0.1
efr32 lock-app BRD4187C FLASH 963472 964824 1352 0.1
RAM 123572 123732 160 0.1
BRD4338a FLASH 757808 759552 1744 0.2
RAM 254196 254348 152 0.1
window-app BRD4187C FLASH 1058828 1060572 1744 0.2
RAM 119800 119960 160 0.1
esp32 all-clusters-app c3devkit DRAM 102572 102572 0 0.0
FLASH 1836770 1836770 0 0.0
IRAM 93540 93540 0 0.0
nrfconnect all-clusters-app nrf52840dk_nrf52840 FLASH 933432 933432 0 0.0
RAM 161377 161377 0 0.0
nxp contact mcxw71+release FLASH 692520 694208 1688 0.2
RAM 61552 61712 160 0.3
psoc6 all-clusters cy8ckit_062s2_43012 FLASH 1678164 1678164 0 0.0
RAM 213956 213956 0 0.0
all-clusters-minimal cy8ckit_062s2_43012 FLASH 1594548 1594548 0 0.0
RAM 211156 211156 0 0.0
light cy8ckit_062s2_43012 FLASH 1460772 1460772 0 0.0
RAM 197776 197776 0 0.0
lock cy8ckit_062s2_43012 FLASH 1493460 1494748 1288 0.1
RAM 225496 225648 152 0.1
qpg lighting-app qpg6200+debug FLASH 837744 838736 992 0.1
RAM 127768 127920 152 0.1
lock-app qpg6200+debug FLASH 774572 775940 1368 0.2
RAM 118736 118880 144 0.1
realtek light-switch-app rtl8777g FLASH 706928 708336 1408 0.2
RAM 106964 107124 160 0.1
lighting-app rtl8777g FLASH 757864 757864 0 0.0
RAM 127296 127296 0 0.0
stm32 light STM32WB5MM-DK FLASH 470256 470256 0 0.0
RAM 141352 141352 0 0.0
telink bridge-app tl7218x FLASH 710646 710646 0 0.0
RAM 90600 90600 0 0.0
light-app-ota-compress-lzma-shell-factory-data tl3218x FLASH 797120 797120 0 0.0
RAM 41024 41024 0 0.0
light-app-ota-shell-factory-data tl7218x FLASH 788322 788322 0 0.0
RAM 93700 93700 0 0.0
light-switch-app-ota-compress-lzma-factory-data tl7218x_retention FLASH 715324 716418 1094 0.2
RAM 51892 52048 156 0.3
light-switch-app-ota-compress-lzma-shell-factory-data tlsr9528a FLASH 748620 749714 1094 0.1
RAM 70932 71088 156 0.2
light-switch-app-ota-factory-data tl3218x_retention FLASH 725474 726656 1182 0.2
RAM 34624 34780 156 0.5
lighting-app-ota-factory-data tlsr9118bdk40d FLASH 602752 602752 0 0.0
RAM 108928 108928 0 0.0
lighting-app-ota-rpc-factory-data-4mb tlsr9518adk80d FLASH 820956 820960 4 0.0
RAM 92096 92096 0 0.0

@mergify mergify bot merged commit 320b105 into project-chip:master Nov 10, 2025
73 checks passed
marybadalyan pushed a commit to marybadalyan/connectedhomeip that referenced this pull request Nov 11, 2025
…hip#41499)

* Decouple ICD Management cluster to be code driven.

* Add cluster to decoupled list.

* Add codegen integration

* Add unit tests

* Zap regen

* Restyler

* Addressed review comments.

* Fix CI

* Refactor the cluster implementation.

* Reorder member varible for memory holes, validated buffer size before storing to userActiveModeTriggerInstruction

* Rebase and zap regen

* Rebase

* Zap regen

* Address copilot review
bhmanda-silabs pushed a commit to bhmanda-silabs/connectedhomeip that referenced this pull request Nov 14, 2025
…hip#41499)

* Decouple ICD Management cluster to be code driven.

* Add cluster to decoupled list.

* Add codegen integration

* Add unit tests

* Zap regen

* Restyler

* Addressed review comments.

* Fix CI

* Refactor the cluster implementation.

* Reorder member varible for memory holes, validated buffer size before storing to userActiveModeTriggerInstruction

* Rebase and zap regen

* Rebase

* Zap regen

* Address copilot review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ServerClusterInterface: decouple ICD cluster.

4 participants